package cache_main

import (
	"context"

	"github.com/go-redis/redis/v8"
	"zhonghui/console/warehouse/dbx"
)

var cache *redis.Client

func init() {
	cache = dbx.NewRedis(dbx.RedisMain)
}

func Client() *redis.Client {
	return cache
}

func ClientCtx(ctx context.Context) *redis.Client {
	return cache.WithContext(ctx)
}
